<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Halaman Admnistrator Culture-vid</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
	<link href="<?php echo base_url()?>asset/css/bootstrap.css" rel="stylesheet">
	<link href="<?php echo base_url()?>asset/css/bootstrap-responsive.css" rel="stylesheet">
	<link href="<?php echo base_url()?>asset/css/style.css" rel="stylesheet">
    <link rel="shortcut icon" href="/favicon.ico">
	
</head>
<body>  

	<div class="container-fluid" style="background-color:">  
		    <div class="row-fluid">  
				<div class="col-lg-12" id="header">  
					<a href="<?php echo base_url()?>index.php"><img src="<?php echo base_url()?>asset/img/logo.png" style="width: 300px; height: 120px; align:center; display: inline; margin: 0px 0 50px 20px"/></img></a>
					<h3 style="margin: -79px 0 20px 90px; font-family: Georgia; font-size: 30px"></h3> <br>
					<small style="font-family: Times New Roman; font-size: 17px; margin: -40px 0 0 90px; display: inline; position: absolute"></small>
					<span style="margin-top: -15px; margin-right:10px; font-family: tahoma; font-size:18px;" class="pull-right col-lg-3">
					
					<?php
					
						if(!$this->session->userdata('isLogin')) { ?>
					<button class="btn btn-primary" data-toggle="modal" data-target="#modal_login">Login</button>
				| <a href="<?php echo base_url()?>index.php/akun/daftar" class="btn btn-success" role="button">Daftar</a>
					<?php } else { ?> <a href="<?php echo base_url()?>index.php/" class="btn btn-success" role="button"><span class="glyphicon glyphicon-home"></span> Home</a> | <a href="<?php echo base_url()?>index.php/akun/keluar_akun" class="btn btn-danger" role="button"><span class="glyphicon glyphicon-log-out"></span> Keluar</a> <?php } ?>
					</span>
					
				</div>  
			</div> <?php $user = $this->session->userdata('username'); ?>
		<div class="row-fluid" >
			<div class="col-lg-12" id="navbar" >
			<!--span class="pull-left" style="margin-left:5px; color:#ffffff;"> <h3><!?php echo $user; ?> : Administrator</h3> </span-->
				<form class="navbar-form navbar-right" style="margin-top:10px; margin-right:0px; margin-left:1px;" role="search" action="<?php echo base_url()?>index.php/video/cari_video" method="post">
				
					  <div class="form-group ">
						<input type="text" class="form-control" placeholder="cari video disini..." name="cari">
					  </div>
					  <button type="submit" class="btn btn-danger " ><span class="glyphicon glyphicon-search "></span></button>
				</form>
				
				
			</div>  
		</div>
		
	<div class="container-fluid">  
		<div class="row-fluid">  
		<div class="col-lg-2 " style="background-color:white;" id="left-content">  
		 <div class="row-fluid">  
			<?php $user = $this->session->userdata('username'); ?>
			<?php $peran = $this->session->userdata('peran'); ?>
			<?php if($user != NULL):?>
		   <div class="col-lg-12" id="sidebar-widget">
				<ul class="nav nav-list">
				  <li class="nav-header" style=""><strong><?php if($peran == 0 ) { echo $user; ?> : Administrator <?php } else { echo $user?> : Administrator Reviewer <?php } ?></strong></li>
					<li><a href="<?php echo base_url()?>index.php/admin" class="glyphicon glyphicon-user">  Profilku </a></li>  
					<?php if($peran == 0){?><li><a href="<?php echo base_url()?>index.php/admin/list_akun" class="glyphicon glyphicon-wrench">  Master Akun </a></li> <?php } ?>
					<?php if($peran == 1 || $peran == 0){?><li><a href="<?php echo base_url()?>index.php/video/data_video" class="glyphicon glyphicon-wrench">  Master Video </a></li> <?php } ?>
					<?php if($peran == 0){?><li class="active"><a href="<?php echo base_url()?>index.php/komentar/data" class="glyphicon glyphicon-wrench">  Master Komentar </a></li> <?php } ?>
					</ul>
				<span class="col-lg-1"/>
			</div> <?php endif;?>
		
		  
		 </div>   
		</div>  
	   
			   	   
		<div class="col-lg-10" style="background-color:white" id="right-content">  
		 <div class="main-content row-fluid">
		<!-- konten video -->
		  <div class="col-lg-12 " style="margin-left:0px">
			<div class="col-lg-12 " style="margin-left:0px">
			<div class="col-lg-4">
				<form class="navbar-form navbar-left" style="margin-top:10px; margin-right:0px; margin-left:1px;" role="search" method="post" action="<?php echo base_url();?>index.php/admin/cari_video">
						  <div class="form-group ">
							<input type="text" class="form-control" name="cari" placeholder="cari judul video di sini...">
						  </div>
						  <button type="submit" class="btn btn-danger " ><span class="glyphicon glyphicon-search "></span></button>
				</form>
			</div>
			<div class="col-lg-4">
				<blink><?php echo $berhasil; ?></blink>
			</div>
			<div class="col-lg-4">
				<h3>Halaman Master Data Komentar</h3>
			</div>
			</div>
			
			
			<div class="col-lg-12 " style="margin-left:0px">
		   <legend style="margin-top:0px"></legend>
			<div class="table-responsive">
				<table class="table table-hover table-bordered">
					<th>No</th>
					<th>ID</th>
					<th>Komentator</th>
					<th>Komentar</th>
					<th>Judul Video</th>
					<th>Waktu</th>
					<th>Hapus</th>
					<!--th>Validasi</th-->
					<?php $no=count($komentar); foreach($komentar as $row) {?>
						<tr <?php if($row->status_komentar == 0){ echo 'class="bg-info"';} else { echo 'class="bg-warning"';}?>>
							<td><?php echo $no?></td>
							<td><?php echo $row->id_komentar ?></td>
							<td><?php echo $row->username ?></td>
							<td><?php echo $row->isi_komentar ?></td>
							<td><?php echo $row->judul_video ?></td>
							<td><?php echo $row->waktu_komentar ?></td>
							<td><center><a href="<?php echo base_url()?>index.php/komentar/delete_komentar/<?php echo $row->id_komentar; ?>" onclick="return confirmDel()"><span class="glyphicon glyphicon-trash"></span></a></center></td>
							<!--td><center><a href="<!?php echo base_url()?>index.php/komentar/validasi_komentar/<!?php echo $row->id_komentar; ?>"><span class="glyphicon glyphicon-retweet"></span></a></center></td-->
						</tr>
						<script type="text/javascript">
							function confirmDel(){
							return confirm("Apakah Anda yakin untuk menghapus komentar ini?");
							}
						</script>
						
					<?php $no-- ; } ?>
			
				</table>
			</div>
				
	  
		  </div>  
		  <!-- end -->
		 </div>
		</div>  
	  
	   </div>  
	  
	  
	  <!--S : Footer-->  
	  
	   <div class="row-fluid">  
		<div class="col-lg-12" id="footer"> <p class = "footer-text"> Copyright 2014 </p> 
		</div>  
	   </div>  
	  
	   <!--E : Footer-->  
	  
	  </div>
	</div>
				
	
	
    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
	
    <script src="<?php echo base_url()?>asset/js/jquery.js"></script>
    <script src="<?php echo base_url()?>asset/js/bootstrap.js"></script>
</body>
</html>